{include file="public/header" /}





<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.refund_manage}</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
            <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
        </div>
        <ul>
            <li>{$Think.lang.refund_manage_help1}</li>
        </ul>
    </div>
    
    <form method="get">
        <div class="ds-search-form">
            <dl>
                <dt>类型</dt>
                <dd>
                    <select name="refund_type">
                        <option value="" {if condition="$Request.param.refund_type eq ''"}selected{/if}>全部</option>
                        <option value="1" {if condition="$Request.param.refund_type eq '1'"}selected{/if}>仅退款</option>
                        <option value="2" {if condition="$Request.param.refund_type eq '2'"}selected{/if}>退款退货</option>
                    </select>
                </dd>
            </dl>
            <dl>
                <dt>
                    <select name="type">
                        <option value="order_sn" {if condition="$Request.param.type eq 'order_sn'"}selected{/if}>{$Think.lang.ds_order_sn}</option>
                        <option value="refund_sn" {if condition="$Request.param.type eq 'refund_sn'"}selected{/if}>{$Think.lang.ds_refund_sn}</option>
                        <option value="store_name" {if condition="$Request.param.type eq 'store_name'"}selected{/if}>{$Think.lang.ds_store_name}</option>
                        <option value="goods_name" {if condition="$Request.param.type eq 'goods_name'"}selected{/if}>{$Think.lang.ds_goods_name}</option>
                        <option value="buyer_name" {if condition="$Request.param.type eq 'buyer_name'"}selected{/if}>{$Think.lang.ds_buyer_name}</option>
                    </select>
                </dt>
                <dd><input type="text" class="text" name="key" value="{$Request.param.key}" /></dd>
            </dl>
            <dl>
                <dt>{$Think.lang.refund_order_add_time}</dt>
                <dd>
                    <input class="txt date" type="text" value="{$Request.param.add_time_from}" id="add_time_from" name="add_time_from">
                    ~ 
                    <input class="txt date" type="text" value="{$Request.param.add_time_to}" id="add_time_to" name="add_time_to"/>
                </dd>
            </dl>
            <div class="btn_group">
                <input type="submit" class="btn" value="{$Think.lang.ds_search}">
                <a href="{:url('Refundreturn/refund_manage')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
            </div>
        </div>
    </form>


    <table class="ds-default-table">
        <thead>
            <tr class="thead">
                <th>{$Think.lang.ds_order_sn}</th>
                <th>{$Think.lang.ds_refund_sn}</th>
                <th>{$Think.lang.ds_store_name}</th>
                <th>{$Think.lang.ds_goods_name}</th>
                <th>{$Think.lang.ds_buyer_name}</th>
                <th>{$Think.lang.refund_buyer_add_time}</th>
                <th>{$Think.lang.refund_order_refund}</th>
                <th>{$Think.lang.refund_seller_state}</th>
                <th>{$Think.lang.refund_admin_state}</th>
                <th class="align-center">{$Think.lang.ds_handle}</th>
            </tr>
        </thead>
        {notempty name="refund_list"}
        <tbody>
            {foreach name="refund_list" item="val" key="key" }
            <tr class="bd-line" >
                <td>{$val.order_sn}<a href="javascript:dsLayerOpen('{:url('Order/show_order',['order_id'=>$val.order_id])}','{$Think.lang.ds_view}{$Think.lang.ds_order}-{$val.order_sn}')">[{$Think.lang.ds_view}]</a>({if $val.refund_type eq '1'}仅退款{else/}退货{/if})</td>
                <td>{$val.refund_sn}</td>
                <td>{$val.store_name}</td>
                <td>{$val.goods_name}</td>
                <td>{$val.buyer_name}</td>
                <td>{$val.refundreturn_add_time|date="Y-m-d H:i:s"}</td>
                <td>{$val.refund_amount}</td>
                <td>{$val.refundreturn_seller_state_desc}{if $val.refund_type eq '2' && $val.refundreturn_goods_state neq '4'}(待收货){/if}</td>
                <td>{$val.refundreturn_admin_state_desc}</td>
                <td class="align-center">
                    <a href="javascript:dsLayerOpen('{:url('Refundreturn/view',['refund_id'=>$val.refund_id])}','{$Think.lang.ds_view}-{$val.order_sn}')" class="dsui-btn-view"><i class="iconfont"></i>{$Think.lang.ds_view}</a>
                    {if $val.refundreturn_admin_state eq '2'}
                    <a href="javascript:dsLayerOpen('{:url('Refundreturn/edit',['refund_id'=>$val.refund_id])}','{$Think.lang.refund_order}-{$val.order_sn}')" class="dsui-btn-add">{$Think.lang.ds_verify}</a>
                    {/if}
                </td>
            </tr>
           {/foreach}
        </tbody>
        {else/}
        <tbody>
            <tr class="no_data">
                <td colspan="20">{$Think.lang.no_record}</td>
            </tr>
        </tbody>
        {/notempty}
    </table>
    {$show_page|raw}
</div>

<script type="text/javascript">
    $(function() {
        $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd'});
        $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>
